import BTTree from "db://app-game/libs/math/behavior-tree/base/BTTree";
import CompositeSelector from "db://app-game/libs/math/behavior-tree/biz/composite/CompositeSelector";
import CompositeSequence from "db://app-game/libs/math/behavior-tree/biz/composite/CompositeSequence";
import ActionCreaturePatrol from "../action/ActionCreaturePatrol";
import ConditionalCreatureMonitorRange from "../conditional/ConditionalCreatureMonitorRange";

/** 小怪兽行为树 */
export default class LittleMonsterBTTree extends BTTree {
  constructor() {
    super();
    this.init();
  }

  init() {
    this.root = new CompositeSequence([
      new CompositeSelector([
        new CompositeSequence([
          new ConditionalCreatureMonitorRange(),
          new ActionCreaturePatrol(),
        ]),
        new CompositeSequence([]),
      ]),
    ]);
  }
}
